import Component from "@glimmer/component";
import { action } from "@ember/object";
import { withPluginApi } from "discourse/lib/plugin-api";
import { inject as service } from "@ember/service";
import { ajax } from "discourse/lib/ajax";


export default class SidebarAboutCategory extends Component {

  @service composer;
 
  constructor() {
    super(...arguments);

    withPluginApi("0.12.1", (api) => {
      this.currentUser = api.getCurrentUser();
    })
  }

  @action
  customCreateTopic() {
    this.composer.openNewTopic({
      preferDraft: true,
    });
  }
}